<template>
  <div v-if="loading" class="loading f-blue-color">
    <div><i class="el-icon-loading"></i></div>
    <div>加载中，请稍后...</div>
  </div>
</template>

<script>
export default {
  data(){
    return{
      loading: false
    }
  },
  methods: {
    start(){
      this.loading = true;
    },
    finish(){
      this.loading = false;
    }
  }
}
</script>

<style scoped>
.loading{
  width: 100%;
  height: 100%;
  position: fixed;
  z-index: 999;
  background-color: rgb(255 255 255 / 80%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}
.el-icon-loading{
  font-size: 50px;
  margin-bottom: 10px;
}
</style>
